@import './base.css';

:root {
  --font-sans:
    ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',
    'Segoe UI Symbol', 'Noto Color Emoji';
}

html,
body {
  /* font-family: 'LXGW WenKai Screen'; */
  font-family: var(--font-sans);
  scrollbar-width: thin;
  scrollbar-arrow-color: transparent;
  scrollbar-base-color: transparent;
  scrollbar-color: transparent transparent;

  background-color: #f4f1ec;

  /* 大屏幕放大(TODO： 放大后tooltip会有偏移bug) */
  /* @media (min-width: 1920px) {
    body {
      transform: scale(1.25);
      transform-origin: top center;
    }
  } */
}

::selection {
  color: #fff;
  background: #000000;
}

/* App 加载启动动画 */
#app-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  background: #f4f1ec;
  color: #f43900;
  font-family: sans-serif;
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
  transform: translateZ(0);
  will-change: opacity, transform;
}

#app-loader.fade-out {
  opacity: 0;
  transform: scale(0.98); /* 微缩平滑消失 */
}

.loader {
  width: 40px;
  height: 40px;
  position: relative;
  transform: translateZ(0);
  will-change: transform;
}

.loader::before {
  content: '';
  box-sizing: border-box;
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 4px solid transparent;
  border-top-color: #f43900;
  animation: spin 1s linear infinite;
  transform-origin: center;
  will-change: transform;
}

#app-loader.fade-out .loader::before {
  animation: spin 0.6s ease-out forwards;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
